package com.chaoyi.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.chaoyi.dao.mysql.TopicMapper;
import com.chaoyi.model.Topic;
import com.chaoyi.service.TopicService;

@Service
public class TopicServiceImpl implements TopicService{
	@Resource
	private TopicMapper topicMapper;

	public List<Topic> findList(String offset, String limit, String topicType) {
		return topicMapper.findList(offset,limit,topicType);
	}

	public int findCount(String topicType) {
		return topicMapper.findCount(topicType);
	}

	@Override
	public int saveTopic(Topic entity) {
		return topicMapper.saveTopic(entity);
	}

	@Override
	public int deleteTopic(int id) {
		return topicMapper.deleteTopic(id);
	}

	@Override
	public Topic findTopicById(int id) {
		return topicMapper.findTopicById(id);
	}

	@Override
	public int topicDeatilSave(Topic entity) {
		return topicMapper.topicDeatilSave(entity);
	}
	
}
